package com.video.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class Webcon implements Serializable {

  @TableId(type = IdType.INPUT)
  private String account;
  private String password;
  private String nickname;
  private Integer priority;
  private String proxy;
  private String clients;
  private Integer solutionid;


  /**
   * 必须添加，不可省略
   * @param proxys
   */
  public void setProxys(String[] proxys) {
    String strs = "";
    for(String str : proxys){
      if(strs != ""){
        strs += "|";
      }
      strs += str;
    }
    this.proxy = strs;
  }

  /**
   * 必须添加，不可省略
   * @param clientss
   */
  public void setClientss(String[] clientss) {
    String strs = "";
    for(String str : clientss){
      if(strs != ""){
        strs += "|";
      }
      strs += str;
    }
    this.clients = strs;
  }

}
